package com.zmzncs.lmtc.module.promotion.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zmzncs.lmtc.module.promotion.dao.DurationRuleFeeScaleMapper;
import com.zmzncs.lmtc.module.promotion.dao.DurationRuleMapper;
import com.zmzncs.lmtc.module.promotion.dao.DurationRuleParkMapper;
import com.zmzncs.lmtc.module.promotion.pojo.duration_rule.DurationRule;
import com.zmzncs.lmtc.module.promotion.pojo.duration_rule.DurationRuleDTO;
import com.zmzncs.lmtc.module.promotion.service.DurationRuleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 促销-时长规则 服务实现类
 * </p>
 *
 * @author 任建波
 * @since 2020-08-12
 */
@Service
public class DurationRuleServiceImpl extends ServiceImpl<DurationRuleMapper, DurationRule> implements DurationRuleService {


    @Autowired
    DurationRuleMapper durationRuleMapper;
    @Autowired
    DurationRuleParkMapper durationRuleParkMapper;
    @Autowired
    DurationRuleFeeScaleMapper durationRuleFeeScaleMapper;


    /**
     * 查询时长规则列表
     */
    @Override
    public IPage<DurationRuleDTO> getDurationRuleList(Page page, String keyword) {
        IPage<DurationRuleDTO> durationRulePage = durationRuleMapper.getDurationRuleList(page, keyword);
        return durationRulePage;
    }

}
